package com.ruoyi.serve.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.serve.domain.VerFreeDesign;
import com.ruoyi.serve.mapper.VerFreeDesignMapper;
import com.ruoyi.serve.service.IVerFreeDesignService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 免费设计服务Service业务层处理
 *
 * @author ruoyi
 * @date 2025-09-10
 */
@Service
public class VerFreeDesignServiceImpl implements IVerFreeDesignService {
    @Autowired
    private VerFreeDesignMapper verFreeDesignMapper;


    /**
     * 新增免费设计服务
     *
     * @param verFreeDesign 免费设计服务
     * @return 结果
     */
    @Override
    public int insertVerFreeDesign(VerFreeDesign verFreeDesign) {
        Long maxId = verFreeDesignMapper.getMaxId();
        if (maxId == null) {
            maxId = 0L;
        }
        verFreeDesign.setId((maxId + 1));
        verFreeDesign.setCreateTime(DateUtils.getNowDate());
        return verFreeDesignMapper.insertVerFreeDesign(verFreeDesign);
    }

}
